﻿//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;

//namespace BoAddonBiz_FreightForwarder.oSysOITM
//{
//    class B1Form_UserDefineChooseList : SAPBoAddon.B1Form
//    {
//        protected override bool BeforeSaveCheckFormData()
//        {
//            return true;
//        }

//        protected override void FormEditModeChange(SAPBoAddon.frmItemEditMode frmEditMode)
//        {

//        }

//        protected override void FormInfoSetting(SAPBoAddon.B1FormSetting FormSetting)
//        {
//            FormSetting.FormType = "AVA_MaterielList";
//            FormSetting.FormFileName = "AVA_MaterielList.srf";
//        }

//        protected override void InitializeForm(SAPBoAddon.B1FormInitializePar InitPar)
//        {
//            this.CurrentForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
//            this.CurrentForm.DataSources.UserDataSources.Item("FatherUid").Value = InitPar.FatherFormUID.TrimStart().TrimEnd();
//            this.CurrentForm.DataSources.UserDataSources.Item("FMtxCurRow").Value = InitPar.parObject.ToString();
//            LoadMaterielInfo();
//        }

//        /// <summary>
//        /// 加载物料信息
//        /// </summary>
//        /// <param name="FormUid"></param>
//        private void LoadMaterielInfo()
//        {
//            SAPbouiCOM.Form oForm;
//            SAPbouiCOM.Grid oGrid;
//            SAPbouiCOM.DataTable oDT;

//            try
//            {
//                string sql_QueryMaterielInfo = @"SELECT * FROM [OITM] ";
//                oForm = this.CurrentForm;
//                oGrid = oForm.Items.Item("Grid_0").Specific;
//                oDT = oForm.DataSources.DataTables.Item("DT_0");
//                oDT.ExecuteQuery(sql_QueryMaterielInfo);
//                oGrid.DataTable = oDT;
//                #region 标题头取名
//                oGrid.Columns.Item("ItemCode").TitleObject.Caption = "物料编号";
//                oGrid.Columns.Item("ItemName").TitleObject.Caption = "物料名称";
//                #endregion
//            }
//            catch (Exception ex) { throw ex; }
//        }
//    }
//}
